sched_tick_suspend();
/* sched_tick_suspend() can raise TIMER_SOFTIRQ. Process it now. */
- process_pending_timers();
+ process_pending_softirqs();
/*
* Interrupts must be disabled during bus mastering calculations and
((unsigned int *)vphysmap_start)[pfn] = mfn;
set_gpfn_from_mfn(mfn, pfn);
if (!(pfn & 0xfffff))
- process_pending_timers();
+ process_pending_softirqs();
}
si->first_p2m_pfn = pfn;
si->nr_p2m_frames = d->tot_pages - count;
++alloc_epfn;
#endif
if (!(pfn & 0xfffff))
- process_pending_timers();
+ process_pending_softirqs();
}
}
BUG_ON(pfn != d->tot_pages);
#undef pfn
page++; pfn++;
if (!(pfn & 0xfffff))
- process_pending_timers();
+ process_pending_softirqs();
}
}
}
mdelay(100);
mb();
- process_pending_timers();
+ process_pending_softirqs();
if ((++i % 10) == 0)
printk(KERN_ERR "CPU %u still not dead...\n", cpu);
}
cpu_set(cpu, smp_commenced_mask);
while (!cpu_isset(cpu, cpu_online_map)) {
mb();
- process_pending_timers();
+ process_pending_softirqs();
}
cpufreq_add_cpu(cpu);
for ( mfn = first_valid_mfn; mfn < max_page; mfn++ )
{
- process_pending_timers();
+ process_pending_softirqs();
pg = mfn_to_page(mfn);
static softirq_handler softirq_handlers[NR_SOFTIRQS];
-asmlinkage void do_softirq(void)
+static void __do_softirq(unsigned long ignore_mask)
{
unsigned int i, cpu;
unsigned long pending;
if ( rcu_pending(cpu) )
rcu_check_callbacks(cpu);
- if ( (pending = softirq_pending(cpu)) == 0 )
+ if ( (pending = (softirq_pending(cpu) & ~ignore_mask)) == 0 )
break;
i = find_first_set_bit(pending);
}
}
+void process_pending_softirqs(void)
+{
+ ASSERT(!in_irq() && local_irq_is_enabled());
+ /* Do not enter scheduler as it can preempt the calling context. */
+ __do_softirq(1ul<<SCHEDULE_SOFTIRQ);
+}
+
+asmlinkage void do_softirq(void)
+{
+ __do_softirq(0);
+}
+
void open_softirq(int nr, softirq_handler handler)
{
ASSERT(nr < NR_SOFTIRQS);
spin_unlock_irq(&ts->lock);
}
-
-void process_pending_timers(void)
-{
- unsigned int cpu = smp_processor_id();
- ASSERT(!in_irq() && local_irq_is_enabled());
- if ( test_and_clear_bit(TIMER_SOFTIRQ, &softirq_pending(cpu)) )
- timer_softirq_action();
-}
-
s_time_t align_timer(s_time_t firsttick, uint64_t period)
{
if ( !period )
printk("%d... ", 3-i);
for ( j = 0; j < 100; j++ )
{
- process_pending_timers();
+ process_pending_softirqs();
mdelay(10);
}
}
void cpu_raise_softirq(unsigned int cpu, unsigned int nr);
void raise_softirq(unsigned int nr);
+/*
+ * Process pending softirqs on this CPU. This should be called periodically
+ * when performing work that prevents softirqs from running in a timely manner.
+ * Use this instead of do_softirq() when you do not want to be preempted.
+ */
+void process_pending_softirqs(void);
+
/*
* TASKLETS -- dynamically-allocatable tasks run in softirq context
* on at most one CPU at a time.
*/
extern void kill_timer(struct timer *timer);
-/*
- * Process pending timers on this CPU. This should be called periodically
- * when performing work that prevents softirqs from running in a timely manner.
- */
-extern void process_pending_timers(void);
-
/*
* Bootstrap initialisation. Must be called before any other timer function.
*/